static var message = preload("res://script/protobuf/message.gd")

static var g_msg_id_map = {
    7017: message.S2C_UseItemResult,
    16033: message.S2C_GetItemResult,
    5812: message.S2C_ApplyEnterTeam,
    13249: message.C2S_UseItemByIndex,
    12413: message.L2C_CreatePlayer,
    15844: message.S2C_NotifySkillBullet,
    3432: message.C2S_DungeonPortal,
    14204: message.S_C2S_ChangeOpenFunctionFlags,
    11287: message.S_S2C_PlayerReward,
    7207: message.C2G_RecentTeammate,
    327: message.S_G2CE_FriendSearch,
    7747: message.C2G_AddInBlackList,
    7484: message.S2C_SevenDayTaskGetReward,
    7520: message.S_AnswerCharID,
    8816: message.S_G2CE_AckTransmitGetPlayerData,
    6625: message.Pro_UnInitDataDefine,
    12702: message.S_S2C_ChangeLang,
    6910: message.C2S_DressEquipment,
    9238: message.S_L2C_QueryGameLine,
    9150: message.PlayerInfo,
    3267: message.S2C_Message,
    9722: message.PlayerLoginInfo,
    13874: message.C2S_OnUnlockBagSlot,
    1737: message.S_G2CE_Task_AddActionData,
    4951: message.S2C_SynCombatEffectiveness,
    4870: message.L2C_LoginGame,
    15839: message.S_IPC_CallRet,
    15612: message.C2S_Decompose,
    8558: message.NotifyText,
    15124: message.C2S_Task__OneKeyTakeRewward,
    15739: message.C2S_Task_FreshChallengeTask,
    15756: message.S2C_SetStrongHoldInfo,
    13714: message.S_G2C_ChatMsg,
    1087: message.S2C_SwitchGameServer,
    5253: message.C2G_DelBlackList,
    45: message.ForbidChat,
    13928: message.NotifyCode,
    2233: message.C2S_ChangeLang,
    12407: message.Notify_PlayerLv,
    11593: message.S2C_ChatMsg,
    9596: message.C2S_ReadMailReq,
    2883: message.S_G2CE_Task_CompleteTask,
    12585: message.C2S_InteractionMsg,
    9418: message.S2C_SceneTriggerCountdown,
    1128: message.S_G2C_WorldChat,
    5151: message.S2C_ReqSkillList,
    10823: message.S_G2C_CheckToken,
    15169: message.S_S2S_SendMsgToPlayer,
    7434: message.C2L_CreateUser,
    2032: message.S_G2C_RegistGameServer,
    11332: message.C2S_GetStrongHoldInfo,
    15545: message.G2C_AckReco,
    10274: message.C2S_SubItem,
    360: message.StrongHoldInfo,
    1767: message.PhpOpenFunctionRsp,
    11655: message.S2C_SetAnimType,
    6213: message.S2C_SynSelfData,
    13283: message.C2S_Task_WriteTargetTask,
    3429: message.TaskInfo,
    10331: message.C2S_UseItem,
    5533: message.S_C2S_NotifySwither,
    11555: message.L2C_CreateUser,
    7099: message.S2C_SevenDayLoginGetReward,
    6103: message.S2C_AddEffect,
    11822: message.S2C_SendMailResult,
    14448: message.C2S_SwitchScene,
    12036: message.S_G2CE_Task_TakeDailyTaskReadward,
    16208: message.S_G2CE_FavorabilityOptr,
    7702: message.L2C_LoginPlayer,
    15339: message.S_C2L_QueryGameServer,
    13150: message.S_CE2G_ACKFriendsLinkData,
    10193: message.S_S2CE_DayChange,
    202: message.PhpSetGMPriority,
    7669: message.C2S_StrengthenProtect,
    14874: message.C2G_DelFriend,
    530: message.C2S_SevenDayTaskGetReward,
    4992: message.MsgPlayerId,
    4025: message.C2S_BagSweepInventory,
    196: message.S2C_FieldExplorer,
    3634: message.C2S_SubItemByIndex,
    2508: message.C2S_GetPlayerDataPack,
    8796: message.C2S_LootTimeOut,
    8617: message.C2S_EquBlessing,
    4966: message.C2L_BDCLogClientField,
    15134: message.S_G2CE_ApplyFriend,
    13654: message.C2S_DelMailReq,
    2627: message.S_G2C_RequestOffline,
    388: message.S_CE2G_TransmitGetPlayerData,
    1404: message.S2C_SyncOpenFunctionFlags,
    10064: message.S_C2L_QueryGameLine,
    9707: message.S_CE2C_GetPlayerDataPack,
    16265: message.C2S_TeamOpt,
    9631: message.S2S_NotifyReceiveMail,
    12345: message.S2C_NpcRuleStateChanged,
    9199: message.C2S_Task_SetTaskShow,
    9025: message.C2S_ClientSceneLoaded,
    5703: message.C2S_ValidateAccount,
    9343: message.S_G2C_GmCmdMsg,
    8650: message.S_C2G_RequestOffline,
    16045: message.Notify_ID,
    8123: message.S2C_NotifySkillCD,
    10243: message.C2G_RequireReco,
    5997: message.S_G2CE_InsertRankPlayerInfo,
    16295: message.S2C_LootPickUp,
    2211: message.C2L_CreatePlayer,
    15291: message.C2S_ChatMsg,
    5809: message.C2S_ConfirmInsuranceWeapon,
    1172: message.L2C_QueryGameLine,
    10754: message.SceneTriggerSubProgress,
    3402: message.S2C_LootTimeOut,
    12478: message.MsgChatInfo,
    13083: message.ForbidLogin,
    9209: message.S2C_NoticeMsg,
    4616: message.C2S_ChatMsgRespone,
    4746: message.C2G_FriendsLinkData,
    13181: message.S_S2CE_LinkRankData,
    15450: message.S2CE_InsertOrUpdateRankData,
    14846: message.StrengthenWeaponCost,
    12155: message.S_G2CE_Task_SetTaskData,
    3282: message.C2S_ExitGame,
    3417: message.S_G2CE_Task_FreshChallengeTask,
    11795: message.Notidy_SceneName,
    9866: message.PhpOpenFunctionReq,
    15452: message.S2C_NotifyLoadScene,
    10637: message.S_C2G_CheckToken,
    3619: message.G2C_UpdateBattlePassState,
    15225: message.C2S_ComposeItem,
    11186: message.S2S_UpdatePlayerData,
    1465: message.C2G_FavorabilityOptr,
    1508: message.C2S_PickUpLoot,
    10128: message.PhpCommonRsp,
    10449: message.C2S_GetTaskList,
    15234: message.C2S_MulStrengthenProtect,
    2146: message.S_S2CE_WeekChange,
    11416: message.S_C2S_PlayerReward,
    3876: message.S2S_UpdatePlayerDataRsp,
    15086: message.S_G2CE_RecentTeammate,
    10936: message.S_G2C_UpdateUseRate,
    11364: message.C2S_RenameByItem,
    4770: message.S_G2CE_GetTaskList,
    9341: message.C2S_SynCliProperty,
    3820: message.G2C_TableDataNotify,
    13910: message.CE2S_SetTeamID,
    1946: message.S_G2CE_Task_AddActivePoint,
    3046: message.S_G2CE_Task_WriteTargetTask,
    13652: message.Notify_LotteryQuality,
    5242: message.S_G2CE_RequireReco,
    11992: message.C2S_FieldExplorer,
    14698: message.S_C2G_AddReward,
    1711: message.S_G2CE_DelFriend,
    14562: message.RegGameServerPlayer,
    5823: message.BDCLogClientField,
    6176: message.G2C_FriendsError,
    7379: message.C2S_Task_ReceiveTask,
    16337: message.GetGiftResult,
    8359: message.C2S_UpgradeStarWeapon,
    10845: message.C2S_SendMailReq,
    14309: message.C2S_ReceiveInsuranceWeapon,
    15045: message.S_G2CE_Task_TakeBattlepassReward,
    5379: message.C2S_SevenDayLoginGetReward,
    14479: message.PhpNotice,
    4800: message.S_G2CE_Task_SetTaskShow,
    11467: message.ChargeItem,
    1519: message.S2C_LoginGameServer,
    11940: message.struct_itemdes,
    1803: message.S2C_CreatePlayer,
    9559: message.S_G2CE_Task_OperationTask,
    14719: message.Notify_ModifyProperty,
    11996: message.S_C2G_KickPlayer,
    80: message.S_G2C_PlayerOnLine,
    9821: message.S_C2S_SyncOpenFunctionFlags,
    16291: message.ChatPlayerId,
    13481: message.S_G2CE_DelBlackList,
    5966: message.C2S_Task_TakeBattlepassReward,
    10433: message.S_S2C_Charge,
    571: message.S_L2C_QueryGameServer,
    10263: message.C2G_ApplyFriend,
    12: message.Notify_ClassLevel,
    12245: message.PhpReward,
    1025: message.S_S2CE_GetPlayerDataPack,
    12497: message.C2S_UnlockInsuranceWeapon,
    8408: message.C2S_QuerySwitchLine,
    7370: message.C2S_Task_TakeDailyTaskReadward,
    9876: message.Notify_PlayerName,
    12138: message.LineInfo,
    13816: message.S_G2CE_AckTransmitApply,
    10503: message.S_G2CE_FriendsLinkData,
    3060: message.Pro_SynDataDefine,
    14766: message.S_CE2G_BroadcastRankSettlement,
    7173: message.PhpEmail,
    2797: message.CloseFunctionType,
    3286: message.C2S_UseTransPoint,
    1410: message.S2CE_RefreshRank,
    15878: message.KEY_VALUE,
    9539: message.S_L2C_KickPlayer,
    16242: message.S2C_ChangeOpenFunctionFlags,
    12611: message.S_C2S_Charge,
    9877: message.S_G2C_PlayerOffLine,
    10249: message.S2C_DungeonPortal,
    8476: message.S_IPC_Call,
    7122: message.Notify_TextParam,
    3587: message.S2CE_TeamOpt,
    3457: message.G2C_AckFriendSearch,
    5637: message.S2C_GainExp,
    8086: message.S_G2C_RegistLogin,
    4498: message.S2C_SqueezeOutNotify,
    5686: message.S_G2CE_Task__OneKeyTakeRewward,
    6006: message.S_QueryCharID,
    12860: message.S_G2CE_PlayerLoginGameSvr,
    3761: message.NotifyData,
    10175: message.S2S_SyncFunctionTime,
    2737: message.S_S2C_QuerySwithLine,
    15905: message.C2S_PickMailAttachementReq,
    12028: message.C2S_LootLog,
    15159: message.C2G_FriendSearch,
    11989: message.NotifyItemNumWithName,
    5583: message.C2L_LoginPlayer,
    10081: message.ChargeItemRsp,
    11611: message.C2S_GetGift,
    1546: message.S_CE2G_AckFavorabilityOptr,
    5681: message.S2C_OnMonsterDie,
    9880: message.C2S_ExchangeItem,
    10849: message.C2S_OpenTransPoint,
    15432: message.S2C_SceneTriggerState,
    1102: message.Notify_TreasureBox,
    15863: message.C2S_StrengthenWeapon,
    15162: message.C2S_MonterInteraction,
    888: message.C2S_LoginGameServer,
    14724: message.S2S_FunctionTimeAcc,
    7951: message.S2C_InteractionResult,
    15985: message.SceneTriggerProgress,
    12945: message.S2C_PickMailAttachementOk,
    4895: message.S_SyncMsg,
    5131: message.C2L_QueryGameLine,
    7170: message.S_G2CE_AddInBlackList,
    13832: message.Pro_InitDataDefine,
    6359: message.S2C_LootItem,
    15430: message.C2S_LinkRankData,
    11813: message.C2G_AckTransmitApply,
    15373: message.C2L_LoginGame,
    3522: message.S_C2L_KickPlayer,
    11289: message.Notify_TextID,
    3498: message.RewardItem,
    12209: message.S_SyncMsgRet,
    3385: message.C2S_BuyMoney,
    4469: message.C2S_ReqSkillList,
    9813: message.C2S_OnUnlockInvSlot,
    13239: message.C2S_CheckInteraction,
    10316: message.CE2G_AckReco,
    13968: message.struct_MailContext,
}



static func create_proto_msg(msg_id):
	var cls = g_msg_id_map.get(msg_id)
	return cls.new()
	
static func init_proto_id():
    for k_v in g_msg_id_map:
		k_v.value.proto_id = k_v.key


class Signals:
	signal on_S2C_UseItemResult(msg)
	signal on_S2C_GetItemResult(msg)
	signal on_S2C_ApplyEnterTeam(msg)
	signal on_L2C_CreatePlayer(msg)
	signal on_S2C_NotifySkillBullet(msg)
	signal on_S_S2C_PlayerReward(msg)
	signal on_S2C_SevenDayTaskGetReward(msg)
	signal on_S_S2C_ChangeLang(msg)
	signal on_S_L2C_QueryGameLine(msg)
	signal on_S2C_Message(msg)
	signal on_S2C_SynCombatEffectiveness(msg)
	signal on_L2C_LoginGame(msg)
	signal on_S2C_SetStrongHoldInfo(msg)
	signal on_S_G2C_ChatMsg(msg)
	signal on_S2C_SwitchGameServer(msg)
	signal on_S2C_ChatMsg(msg)
	signal on_S2C_SceneTriggerCountdown(msg)
	signal on_S_G2C_WorldChat(msg)
	signal on_S2C_ReqSkillList(msg)
	signal on_S_G2C_CheckToken(msg)
	signal on_S_G2C_RegistGameServer(msg)
	signal on_G2C_AckReco(msg)
	signal on_S2C_SetAnimType(msg)
	signal on_S2C_SynSelfData(msg)
	signal on_L2C_CreateUser(msg)
	signal on_S2C_SevenDayLoginGetReward(msg)
	signal on_S2C_AddEffect(msg)
	signal on_S2C_SendMailResult(msg)
	signal on_L2C_LoginPlayer(msg)
	signal on_S2C_FieldExplorer(msg)
	signal on_S_G2C_RequestOffline(msg)
	signal on_S2C_SyncOpenFunctionFlags(msg)
	signal on_S_CE2C_GetPlayerDataPack(msg)
	signal on_S2C_NpcRuleStateChanged(msg)
	signal on_S_G2C_GmCmdMsg(msg)
	signal on_S2C_NotifySkillCD(msg)
	signal on_S2C_LootPickUp(msg)
	signal on_L2C_QueryGameLine(msg)
	signal on_S2C_LootTimeOut(msg)
	signal on_S2C_NoticeMsg(msg)
	signal on_S2C_NotifyLoadScene(msg)
	signal on_G2C_UpdateBattlePassState(msg)
	signal on_S_G2C_UpdateUseRate(msg)
	signal on_G2C_TableDataNotify(msg)
	signal on_G2C_FriendsError(msg)
	signal on_S2C_LoginGameServer(msg)
	signal on_S2C_CreatePlayer(msg)
	signal on_S_G2C_PlayerOnLine(msg)
	signal on_S_S2C_Charge(msg)
	signal on_S_L2C_QueryGameServer(msg)
	signal on_S_L2C_KickPlayer(msg)
	signal on_S2C_ChangeOpenFunctionFlags(msg)
	signal on_S_G2C_PlayerOffLine(msg)
	signal on_S2C_DungeonPortal(msg)
	signal on_G2C_AckFriendSearch(msg)
	signal on_S2C_GainExp(msg)
	signal on_S_G2C_RegistLogin(msg)
	signal on_S2C_SqueezeOutNotify(msg)
	signal on_S_S2C_QuerySwithLine(msg)
	signal on_S2C_OnMonsterDie(msg)
	signal on_S2C_SceneTriggerState(msg)
	signal on_S2C_InteractionResult(msg)
	signal on_S2C_PickMailAttachementOk(msg)
	signal on_S2C_LootItem(msg)
	signal on_CS2C_SyncServerTime(msg)

static var signals = Signals.new()
